---
layout: api
title: "v2.1.6 JavaScript Library: L.mapbox.sanitize(string)"
categories: api
version: v2.1.6
permalink: /api/v2.1.6/l-mapbox-sanitize/
---
<h2 id="section-l-mapbox-sanitize">L.mapbox.sanitize(string)</h2>
<p>A HTML sanitization function, with the same effect as the default value of the <code>sanitizer</code> option of <code><a href="/mapbox.js/api/v2.1.6/l-mapbox-featurelayer">L.mapbox.featureLayer</a></code>, <code><a href="/mapbox.js/api/v2.1.6/l-mapbox-gridcontrol">L.mapbox.gridControl</a></code>, and <code><a href="/mapbox.js/api/v2.1.6/l-mapbox-legendcontrol">L.mapbox.legendControl</a></code>.</p>
<table>
<thead>
<tr>
<th>Options</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>string</td>
<td>String of content you wish to sanitize.</td>
</tr>
</tbody>
</table>
